home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
GAMES
/
WIMP
/
MINES2
/
!Mines
/
c
/
Hintdebug
< prev
next >
Wrap
Text File
|
1995-01-14
|
1KB
|
46 lines
int save_recurse=FALSE;
FILE *save_recursef;
void save_border(FILE *f)
{
border_typ *i;
for (i=border_arr;i<border_anz;i++)
fprintf(f,"%2i %2i %2i %2i\n",i->x,i->y,i->domain,feld[i->x][i->y]);
fprintf(f,"\n");
}
void hint_debug(void)
{
int found_7,domain;border_typ *border;
for (border=border_arr;border<border_anz;border++)
{
int d=feld[border->x][border->y];
if (((d & h_MASK)==h_NOMINE) && (d & MINE))
werr(FALSE,"Error: No mine assumed and mine found");
if (((d & h_MASK)==h_MINE) && !(d & MINE))
werr(FALSE,"Error: Mine assumed and no mine found");
}
for (border=border_arr;border<border_anz;border++)
{
int x=border->x,y=border->y;
int d=feld[x][y] & h_MASK;
if (d==h_MINE) draw_sprite(x,y,&mine.id);
if (d==h_NOMINE) draw_sprite(x,y,&nomine.id);
if (d==h_UNKNOWN) draw_sprite(x,y,&questionmark.id);
if (d==h_EVERYTHING) found_7=TRUE;
}
if (found_7)
{
save_recurse=TRUE;
save_recursef=fopen("<Mines$Dir>.Recurse","w");
border=border_arr;domain=1;
do {
if (border<border_anz) permutate1(border,0,domain);
while ((border->domain==domain) && (border<border_anz)) border++;
domain++;
} while (border<border_anz);
fclose(save_recursef);save_recurse=FALSE;
}
}